#ifndef SPRITE_BATCH_H
#define SPRITE_BATCH_H

#include <algorithm>
#include <vector>
#include "Sprite.h"

namespace dkm
{
	class SpriteGroup : public Component
	{
	public:
		SpriteGroup(ID3DXSprite* dxSprite);
		virtual ~SpriteGroup();

		void Update(const float dt);
		void Draw();

		void AddSprite(Sprite* sprite);
		void RemoveSprite(Sprite* sprite);

		//Add a sprite to be batched
		void AddSpriteToBatch(Component* sprite);

		//Move all the sprites in the group
		void MoveSprites(float x, float y);

		//Scale all the sprites in the group
		void ScaleSprites(float scaleX, float scaleY);

	private:
		std::vector<Sprite*> allSprites;
		ID3DXSprite* dxSprite;
	};
}


#endif